home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / GCC 1.37.1r14 / usr / gcc-1.37.1r14 / (gcc-1.37.π) / rtl.h < prev    next >
Encoding:
Text File  |  1993-07-05  |  21.1 KB  |  605 lines  |  [TEXT/KAHL]

  1. /* Register Transfer Language (RTL) definitions for GNU C-Compiler
  2.    Copyright (C) 1987 Free Software Foundation, Inc.
  3.    Copyright (C) 1989, 1990 Apple Computer, Inc.
  4.  
  5. This file is part of GNU CC.
  6.  
  7. GNU CC is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 1, or (at your option)
  10. any later version.
  11.  
  12. GNU CC is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. GNU General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with GNU CC; see the file COPYING.  If not, write to
  19. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  20.  
  21.  
  22. #undef FFS  /* Some systems predefine this symbol; don't let it interfere.  */
  23.  
  24. /* Register Transfer Language EXPRESSIONS CODES */
  25.  
  26. #define RTX_CODE    enum rtx_code
  27. enum rtx_code  {
  28.  
  29. #define DEF_RTL_EXPR(ENUM, NAME, FORMAT)   ENUM ,
  30. #include "rtl.def"        /* rtl expressions are documented here */
  31. #undef DEF_RTL_EXPR
  32.  
  33. #ifdef MPW_C31
  34.   LAST_AND_UNUSED_RTX_CODE, rtx_code_intifier = 1000000};    /* A convienent way to get a value for
  35.                    NUM_RTX_CODE.
  36.                    Assumes default enum value assignement.  */
  37. #else
  38.   LAST_AND_UNUSED_RTX_CODE};    /* A convienent way to get a value for
  39.                    NUM_RTX_CODE.
  40.                    Assumes default enum value assignement.  */
  41. #endif /* MPW_C31 */
  42.  
  43. #define NUM_RTX_CODE ((int)LAST_AND_UNUSED_RTX_CODE)
  44.                 /* The cast here, saves many elsewhere.  */
  45.  
  46. extern int rtx_length[];
  47. #define GET_RTX_LENGTH(CODE)        (rtx_length[(int)(CODE)])
  48.  
  49. extern char *rtx_name[];
  50. #define GET_RTX_NAME(CODE)        (rtx_name[(int)(CODE)])
  51.  
  52. extern char *rtx_format[];
  53. #define GET_RTX_FORMAT(CODE)        (rtx_format[(int)(CODE)])
  54.  
  55.  
  56. /* Get the definition of `enum machine_mode' */
  57.  
  58. #ifndef HAVE_MACHINE_MODES
  59.  
  60. #define DEF_MACHMODE(SYM, NAME, TYPE, SIZE, UNIT, WIDER)  SYM,
  61.  
  62. enum machine_mode {
  63. #include "machmode.def"
  64. #ifdef MPW_C31
  65. MAX_MACHINE_MODE, mach_mode_intifier = 1000000 };
  66. #else
  67. MAX_MACHINE_MODE };
  68. #endif /* MPW_C31 */
  69.  
  70. #undef DEF_MACHMODE
  71.  
  72. #define HAVE_MACHINE_MODES
  73.  
  74. #endif /* not HAVE_MACHINE_MODES */
  75.  
  76. #ifndef NUM_MACHINE_MODES
  77. #define NUM_MACHINE_MODES (int) MAX_MACHINE_MODE
  78. #endif
  79.  
  80. /* Get the name of mode MODE as a string.  */
  81.  
  82. extern char *mode_name[];
  83. #define GET_MODE_NAME(MODE)        (mode_name[(int)(MODE)])
  84.  
  85. enum mode_class { MODE_RANDOM, MODE_INT, MODE_FLOAT,
  86. #ifdef MPW_C31
  87.           MODE_COMPLEX_INT, MODE_COMPLEX_FLOAT, MODE_FUNCTION,
  88.           mode_class_intifier = 1000000 };
  89. #else
  90.           MODE_COMPLEX_INT, MODE_COMPLEX_FLOAT, MODE_FUNCTION };
  91. #endif /* MPW_C31 */
  92.  
  93. /* Get the general kind of object that mode MODE represents
  94.    (integer, floating, complex, etc.)  */
  95.  
  96. extern enum mode_class mode_class[];
  97. #define GET_MODE_CLASS(MODE)        (mode_class[(int)(MODE)])
  98.  
  99. /* Get the size in bytes of an object of mode MODE.  */
  100.  
  101. extern int mode_size[];
  102. #define GET_MODE_SIZE(MODE)        (mode_size[(int)(MODE)])
  103.  
  104. /* Get the size in bytes of the basic parts of an object of mode MODE.  */
  105.  
  106. extern int mode_unit_size[];
  107. #define GET_MODE_UNIT_SIZE(MODE)    (mode_unit_size[(int)(MODE)])
  108.  
  109. /* Get the size in bits of an object of mode MODE.  */
  110.  
  111. #define GET_MODE_BITSIZE(MODE)  (BITS_PER_UNIT * mode_size[(int)(MODE)])
  112.  
  113. /* Get a bitmask containing 1 for all bits in a word
  114.    that fit within mode MODE.  */
  115.  
  116. #define GET_MODE_MASK(MODE)  \
  117.    ((GET_MODE_BITSIZE (MODE) >= HOST_BITS_PER_INT)  \
  118.     ? -1 : ((1 << GET_MODE_BITSIZE (MODE)) - 1))
  119.  
  120. /* Get the next wider natural mode (eg, QI -> HI -> SI -> DI -> TI).  */
  121.  
  122. extern enum machine_mode mode_wider_mode[];
  123. #define GET_MODE_WIDER_MODE(MODE)    (mode_wider_mode[(int)(MODE)])
  124.  
  125. /* Common union for an element of an rtx.  */
  126.  
  127. typedef union rtunion_def
  128. {
  129.   int rtint;
  130.   char *rtstr;
  131.   struct rtx_def *rtx;
  132.   struct rtvec_def *rtvec;
  133.   enum machine_mode rttype;
  134. } rtunion;
  135.  
  136. /* RTL expression ("rtx").  */
  137.  
  138. typedef struct rtx_def
  139. {
  140. #ifdef SHORT_ENUM_BUG
  141.   unsigned short code;
  142. #else
  143.   /* The kind of expression this is.  */
  144. #ifdef MPW_C
  145.   /* MPW C doesn't allow field specs on enums, so use int instead. */
  146.   unsigned int code : 16;
  147. #else
  148.   enum rtx_code code : 16;
  149. #endif /* MPW_C */
  150. #endif
  151.   /* The kind of value the expression has.  */
  152. #ifdef MPW_C
  153.   /* MPW C doesn't allow field specs on enums, so use int instead. */
  154.   unsigned int mode : 8;
  155. #else
  156.   enum machine_mode mode : 8;
  157. #endif /* MPW_C */
  158.   /* 1 in an INSN if it can alter flow of control
  159.      within this function.  Not yet used!  */
  160.   unsigned int jump : 1;
  161.   /* 1 in an INSN if it can call another function.  Not yet used!  */
  162.   unsigned int call : 1;
  163.   /* 1 in a MEM or REG if value of this expression will never change
  164.      during the current function, even though it is not
  165.      manifestly constant.
  166.      1 in a SYMBOL_REF if it addresses something in the per-function
  167.      constants pool.  */
  168.   unsigned int unchanging : 1;
  169.   /* 1 in a MEM expression if contents of memory are volatile.  */
  170.   /* 1 in an INSN, CALL_INSN, JUMP_INSN, CODE_LABEL or BARRIER
  171.      if it is deleted.  */
  172.   /* 1 in a REG expression if corresponds to a variable declared by the user.
  173.      0 for an internally generated temporary.  */
  174.   unsigned int volatil : 1;
  175.   /* 1 in a MEM referring to a field of a structure (not a union!).
  176.      0 if the MEM was a variable or the result of a * operator in C;
  177.      1 if it was the result of a . or -> operator (on a struct) in C.  */
  178.   unsigned int in_struct : 1;
  179.   /* 1 if this rtx is used.  This is used for copying shared structure.
  180.      See `unshare_all_rtl'.
  181.      This bit is used to detect that event.  */
  182.   unsigned int used : 1;
  183.   /* Nonzero if this rtx came from procedure integration.
  184.      In a REG, nonzero means this reg refers to the return value
  185.      of the current function.  */
  186.   unsigned integrated : 1;
  187.   /* The first element of the operands of this rtx.
  188.      The number of operands and their types are controlled
  189.      by the `code' field, according to rtl.def.  */
  190.   rtunion fld[1];
  191. } *rtx;
  192.  
  193. #define NULL_RTX (rtx) 0
  194.  
  195. /* Define macros to access the `code' field of the rtx.  */
  196.  
  197. #ifdef SHORT_ENUM_BUG
  198. #define GET_CODE(RTX)        ((enum rtx_code) ((RTX)->code))
  199. #define PUT_CODE(RTX, CODE)    ((RTX)->code = ((short) (CODE)))
  200. #else
  201. #define GET_CODE(RTX)        ((RTX)->code)
  202. #define PUT_CODE(RTX, CODE)    ((RTX)->code = (CODE))
  203. #endif
  204.  
  205. #define GET_MODE(RTX)        ((RTX)->mode)
  206. #define PUT_MODE(RTX, MODE)    ((RTX)->mode = (MODE))
  207.  
  208. #define RTX_INTEGRATED_P(RTX) ((RTX)->integrated)
  209. #define RTX_UNCHANGING_P(RTX) ((RTX)->unchanging)
  210.  
  211. /* RTL vector.  These appear inside RTX's when there is a need
  212.    for a variable number of things.  The principle use is inside
  213.    PARALLEL expressions.  */
  214.  
  215. typedef struct rtvec_def{
  216.   unsigned num_elem;        /* number of elements */
  217.   rtunion elem[1];
  218. } *rtvec;
  219.  
  220. #define NULL_RTVEC (rtvec) 0
  221.  
  222. #define GET_NUM_ELEM(RTVEC)        ((RTVEC)->num_elem)
  223. #define PUT_NUM_ELEM(RTVEC, NUM)    ((RTVEC)->num_elem = (unsigned) NUM)
  224.  
  225. /* 1 if X is a REG.  */
  226.  
  227. #define REG_P(X) (GET_CODE (X) == REG)
  228.  
  229. /* 1 if X is a constant value that is an integer.  */
  230. /* Macro too complicated for MPW C compiler, must be fn in rtl.c */
  231.  
  232. #ifndef MPW_C
  233. /* Defining CONSTANT_P as a macro gives MPW C heartburn in several places. */
  234. #define CONSTANT_P(X)   \
  235.   (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF        \
  236.    || GET_CODE (X) == CONST_INT                        \
  237.    || GET_CODE (X) == CONST)
  238. #endif /* not MPW_C */
  239.  
  240. /* General accessor macros for accessing the fields of an rtx.  */
  241.  
  242. #define XEXP(RTX, N)    ((RTX)->fld[N].rtx)
  243. #define XINT(RTX, N)    ((RTX)->fld[N].rtint)
  244. #define XSTR(RTX, N)    ((RTX)->fld[N].rtstr)
  245. #define XVEC(RTX, N)    ((RTX)->fld[N].rtvec)
  246. #define XVECLEN(RTX, N)    ((RTX)->fld[N].rtvec->num_elem)
  247. #define XVECEXP(RTX,N,M)((RTX)->fld[N].rtvec->elem[M].rtx)
  248.  
  249. /* ACCESS MACROS for particular fields of insns.  */
  250.  
  251. /* Holds a unique number for each insn.
  252.    These are not necessarily sequentially increasing.  */
  253. #define INSN_UID(INSN)    ((INSN)->fld[0].rtint)
  254.  
  255. /* Chain insns together in sequence.  */
  256. #define PREV_INSN(INSN)    ((INSN)->fld[1].rtx)
  257. #define NEXT_INSN(INSN)    ((INSN)->fld[2].rtx)
  258.  
  259. /* The body of an insn.  */
  260. #define PATTERN(INSN)    ((INSN)->fld[3].rtx)
  261.  
  262. /* Code number of instruction, from when it was recognized.
  263.    -1 means this instruction has not been recognized yet.  */
  264. #define INSN_CODE(INSN) ((INSN)->fld[4].rtint)
  265.  
  266. /* Set up in flow.c; empty before then.
  267.    Holds a chain of INSN_LIST rtx's whose first operands point at
  268.    previous insns with direct data-flow connections to this one.
  269.    That means that those insns set variables whose next use is in this insn.
  270.    They are always in the same basic block as this insn.  */
  271. #define LOG_LINKS(INSN)        ((INSN)->fld[5].rtx)
  272.  
  273. /* 1 if insn has been deleted.  */
  274. #define INSN_DELETED_P(INSN) ((INSN)->volatil)
  275.  
  276. /* Holds a list of notes on what this insn does to various REGs.
  277.    It is a chain of EXPR_LIST rtx's, where the second operand
  278.    is the chain pointer and the first operand is the REG being described.
  279.    The mode field of the EXPR_LIST contains not a real machine mode
  280.    but a value that says what this note says about the REG:
  281.      REG_DEAD means that the REG dies in this insn.
  282.      REG_INC means that the REG is autoincremented or autodecremented.
  283.    Note that one insn can have both REG_DEAD and REG_INC for the same register
  284.    if the register is preincremented or predecremented in the insn
  285.    and not needed afterward.  This can probably happen.
  286.      REG_EQUIV describes the insn as a whole; it says that the
  287.    insn sets a register to a constant value or to be equivalent to
  288.    a memory address.  If the
  289.    register is spilled to the stack then the constant value
  290.    should be substituted for it.  The contents of the REG_EQUIV
  291.    is the constant value or memory address, which may be different
  292.    from the source of the SET although it has the same value. 
  293.      REG_EQUAL is like REG_EQUIV except that the destination
  294.    is only momentarily equal to the specified rtx.  Therefore, it
  295.    cannot be used for substitution; but it can be used for cse.
  296.      REG_RETVAL means that this insn copies the return-value of
  297.    a library call out of the hard reg for return values.  This note
  298.    is actually an INSN_LIST and it points to the first insn involved
  299.    in setting up arguments for the call.  flow.c uses this to delete
  300.    the entire library call when its result is dead.
  301.      REG_LIBCALL is the inverse of REG_RETVAL: it goes on the first insn
  302.    of the library call and points at the one that has the REG_RETVAL.
  303.      REG_WAS_0 says that the register set in this insn held 0 before the insn.
  304.    The contents of the note is the insn that stored the 0.
  305.    If that insn is deleted or patched to a NOTE, the REG_WAS_0 is inoperative.
  306.    The REG_WAS_0 note is actually an INSN_LIST, not an EXPR_LIST.
  307.      REG_NONNEG means that the register is always nonnegative during
  308.    the containing loop.  This is used in branches so that decrement and
  309.    branch instructions terminating on zero can be matched.
  310.      REG_UNSET identifies a pseudo-reg used in this insn and never set.  */
  311.  
  312. #define REG_NOTES(INSN)    ((INSN)->fld[6].rtx)
  313.  
  314. /* Don't forget to change reg_note_name in rtl.c.  */
  315. enum reg_note { REG_DEAD = 1, REG_INC = 2, REG_EQUIV = 3, REG_WAS_0 = 4,
  316.         REG_EQUAL = 5, REG_RETVAL = 6, REG_LIBCALL = 7,
  317. #ifdef MPW_C31
  318.         REG_NONNEG = 8, REG_UNSET = 9, reg_note_intifier = 1000000 };
  319. #else
  320.         REG_NONNEG = 8, REG_UNSET = 9 };
  321. #endif /* MPW_C31 */
  322.  
  323. /* Extract the reg-note kind from an EXPR_LIST.  */
  324. #define REG_NOTE_KIND(LINK) ((enum reg_note) GET_MODE (LINK))
  325.  
  326. /* Names for REG_NOTE's in EXPR_LIST insn's.  */
  327.  
  328. extern char *reg_note_name[];
  329. #define GET_REG_NOTE_NAME(MODE) (reg_note_name[(int)(MODE)])
  330.  
  331. /* The label-number of a code-label.  The assembler label
  332.    is made from `L' and the label-number printed in decimal.
  333.    Label numbers are unique in a compilation.  */
  334. #define CODE_LABEL_NUMBER(INSN)    ((INSN)->fld[3].rtint)
  335.  
  336. #define LINE_NUMBER NOTE
  337.  
  338. /* In a NOTE that is a line number, this is a string for the file name
  339.    that the line is in.  */
  340.  
  341. #define NOTE_SOURCE_FILE(INSN)  ((INSN)->fld[3].rtstr)
  342.  
  343. /* In a NOTE that is a line number, this is the line number.
  344.    Other kinds of NOTEs are identified by negative numbers here.  */
  345. #define NOTE_LINE_NUMBER(INSN) ((INSN)->fld[4].rtint)
  346.  
  347. /* Codes that appear in the NOTE_LINE_NUMBER field
  348.    for kinds of notes that are not line numbers.  */
  349.  
  350. /* This note indicates the end of the real body of the function,
  351.    after moving the parms into their homes, etc.  */
  352. #define NOTE_INSN_FUNCTION_BEG 0
  353.  
  354. /* This note is used to get rid of an insn
  355.    when it isn't safe to patch the insn out of the chain.  */
  356. #define NOTE_INSN_DELETED -1
  357. #define NOTE_INSN_BLOCK_BEG -2
  358. #define NOTE_INSN_BLOCK_END -3
  359. #define NOTE_INSN_LOOP_BEG -4
  360. #define NOTE_INSN_LOOP_END -5
  361. /* This kind of note is generated at the end of the function body,
  362.    just before the return insn or return label.
  363.    In an optimizing compilation it is deleted by the first jump optimization,
  364.    after enabling that optimizer to determine whether control can fall
  365.    off the end of the function body without a return statement.  */
  366. #define NOTE_INSN_FUNCTION_END -6
  367. /* This kind of note is generated just after each call to `setjmp', et al.  */
  368. #define NOTE_INSN_SETJMP -7
  369. /* Generated at the place in a loop that `continue' jumps to.  */
  370. #define NOTE_INSN_LOOP_CONT -8
  371. /* Don't forget to change note_insn_name in rtl.c.  */
  372.  
  373. #define NOTE_DECL_NAME(INSN) ((INSN)->fld[3].rtstr)
  374. #define NOTE_DECL_CODE(INSN) ((INSN)->fld[4].rtint)
  375. #define NOTE_DECL_RTL(INSN) ((INSN)->fld[5].rtx)
  376. #define NOTE_DECL_IDENTIFIER(INSN) ((INSN)->fld[6].rtint)
  377. #define NOTE_DECL_TYPE(INSN) ((INSN)->fld[7].rtint)
  378.  
  379. /* Names for NOTE insn's other than line numbers.  */
  380.  
  381. extern char *note_insn_name[];
  382. #define GET_NOTE_INSN_NAME(NOTE_CODE) (note_insn_name[-(NOTE_CODE)])
  383.  
  384. /* In jump.c, each label contains a count of the number
  385.    of LABEL_REFs that point at it, so unused labels can be deleted.  */
  386. #define LABEL_NUSES(LABEL) ((LABEL)->fld[4].rtint)
  387.  
  388. /* In jump.c, each JUMP_INSN can point to a label that it can jump to,
  389.    so that if the JUMP_INSN is deleted, the label's LABEL_NUSES can
  390.    be decremented and possibly the label can be deleted.  */
  391. #define JUMP_LABEL(INSN)   ((INSN)->fld[7].rtx)
  392.  
  393. /* Once basic blocks are found in flow.c,
  394.    each CODE_LABEL starts a chain that goes through
  395.    all the LABEL_REFs that jump to that label.
  396.    The chain eventually winds up at the CODE_LABEL; it is circular.  */
  397. #define LABEL_REFS(LABEL) ((LABEL)->fld[4].rtx)
  398.  
  399. /* This is the field in the LABEL_REF through which the circular chain
  400.    of references to a particular label is linked.
  401.    This chain is set up in flow.c.  */
  402.  
  403. #define LABEL_NEXTREF(REF) ((REF)->fld[1].rtx)
  404.  
  405. /* Once basic blocks are found in flow.c,
  406.    Each LABEL_REF points to its containing instruction with this field.  */
  407.  
  408. #define CONTAINING_INSN(RTX) ((RTX)->fld[2].rtx)
  409.  
  410. /* For a REG rtx, REGNO extracts the register number.  */
  411.  
  412. #define REGNO(RTX) ((RTX)->fld[0].rtint)
  413.  
  414. /* For a REG rtx, REG_FUNCTION_VALUE_P is nonzero if the reg
  415.    is the current function's return value.  */
  416.  
  417. #define REG_FUNCTION_VALUE_P(RTX) ((RTX)->integrated)
  418.  
  419. /* 1 in a REG rtx if it corresponds to a variable declared by the user.  */
  420. #define REG_USERVAR_P(RTX) ((RTX)->volatil)
  421.  
  422. /* For a CONST_INT rtx, INTVAL extracts the integer.  */
  423.  
  424. #define INTVAL(RTX) ((RTX)->fld[0].rtint)
  425.  
  426. /* For a SUBREG rtx, SUBREG_REG extracts the value we want a subreg of.
  427.    SUBREG_WORD extracts the word-number.  */
  428.  
  429. #define SUBREG_REG(RTX) ((RTX)->fld[0].rtx)
  430. #define SUBREG_WORD(RTX) ((RTX)->fld[1].rtint)
  431.  
  432. /* Access various components of an ASM_OPERANDS rtx.  */
  433.  
  434. #define ASM_OPERANDS_TEMPLATE(RTX) XSTR ((RTX), 0)
  435. #define ASM_OPERANDS_OUTPUT_CONSTRAINT(RTX) XSTR ((RTX), 1)
  436. #define ASM_OPERANDS_OUTPUT_IDX(RTX) XINT ((RTX), 2)
  437. #define ASM_OPERANDS_INPUT_VEC(RTX) XVEC ((RTX), 3)
  438. #define ASM_OPERANDS_INPUT_CONSTRAINT_VEC(RTX) XVEC ((RTX), 4)
  439. #define ASM_OPERANDS_INPUT(RTX, N) XVECEXP ((RTX), 3, (N))
  440. #define ASM_OPERANDS_INPUT_CONSTRAINT(RTX, N) XSTR (XVECEXP ((RTX), 4, (N)), 0)
  441. #define ASM_OPERANDS_INPUT_MODE(RTX, N) GET_MODE (XVECEXP ((RTX), 4, (N)))
  442. #define ASM_OPERANDS_SOURCE_FILE(RTX) XSTR ((RTX), 5)
  443. #define ASM_OPERANDS_SOURCE_LINE(RTX) XINT ((RTX), 6)
  444.  
  445. /* For a MEM rtx, 1 if it's a volatile reference.
  446.    Also in an ASM_OPERANDS rtx.  */
  447. #define MEM_VOLATILE_P(RTX) ((RTX)->volatil)
  448.  
  449. /* For a MEM rtx, 1 if it refers to a structure or union component.  */
  450. #define MEM_IN_STRUCT_P(RTX) ((RTX)->in_struct)
  451.  
  452. /* For a SET rtx, SET_DEST is the place that is set
  453.    and SET_SRC is the value it is set to.  */
  454. #define SET_DEST(RTX) ((RTX)->fld[0].rtx)
  455. #define SET_SRC(RTX) ((RTX)->fld[1].rtx)
  456.  
  457. /* 1 in a SYMBOL_REF if it addresses this function's constants pool.  */
  458. #define CONSTANT_POOL_ADDRESS_P(RTX) ((RTX)->unchanging)
  459.  
  460. /* For an INLINE_HEADER rtx, FIRST_FUNCTION_INSN is the first insn
  461.    of the function that is not involved in copying parameters to
  462.    pseudo-registers.  FIRST_PARM_INSN is the very first insn of
  463.    the function, including the parameter copying.
  464.    We keep this around in case we must splice
  465.    this function into the assembly code at the end of the file.
  466.    FIRST_LABELNO is the first label number used by the function (inclusive).
  467.    LAST_LABELNO is the last label used by the function (exclusive).
  468.    MAX_REGNUM is the largest pseudo-register used by that function.
  469.  
  470.    We want this to lay down like an INSN.  The PREV_INSN field
  471.    is always NULL.  The NEXT_INSN field always points to the
  472.    first function insn of the function being squirreled away.  */
  473.  
  474. #define FIRST_FUNCTION_INSN(RTX) ((RTX)->fld[2].rtx)
  475. #define FIRST_PARM_INSN(RTX) ((RTX)->fld[3].rtx)
  476. #define FIRST_LABELNO(RTX) ((RTX)->fld[4].rtint)
  477. #define LAST_LABELNO(RTX) ((RTX)->fld[5].rtint)
  478. #define MAX_PARMREG(RTX) ((RTX)->fld[6].rtint)
  479. #define MAX_REGNUM(RTX) ((RTX)->fld[7].rtint)
  480. #define FUNCTION_ARGS_SIZE(RTX) ((RTX)->fld[8].rtint)
  481.  
  482. /* Generally useful functions.  */
  483.  
  484. extern rtx rtx_alloc ();
  485. extern rtvec rtvec_alloc ();
  486. extern rtx find_reg_note (
  487.      rtx insn,
  488.      enum reg_note kind,
  489.      rtx datum);
  490. extern rtx gen_rtx (
  491. #ifdef APPLE_HAX_VA
  492.   enum rtx_code code,
  493.   enum machine_mode mode, ...);
  494. extern rtvec gen_rtvec (int n, ...);
  495. #else
  496.   );
  497. extern rtvec gen_rtvec ();
  498. #endif
  499. extern rtx copy_rtx ();
  500. extern rtvec gen_rtvec_v ();
  501. extern rtx gen_reg_rtx ();
  502. extern rtx gen_label_rtx ();
  503. extern rtx gen_inline_header_rtx ();
  504. extern rtx gen_lowpart ();
  505. extern rtx gen_highpart ();
  506. extern int subreg_lowpart_p ();
  507. extern rtx make_safe_from ();
  508. extern rtx memory_address ();
  509. extern rtx get_insns ();
  510. extern rtx get_last_insn ();
  511. extern rtx start_sequence ();
  512. extern rtx gen_sequence ();
  513. extern rtx expand_expr ();
  514. extern rtx output_constant_def ();
  515. extern rtx immed_real_const ();
  516. extern rtx immed_real_const_1 ();
  517. extern rtx immed_double_const ();
  518. extern rtx force_const_double_mem ();
  519. extern rtx force_const_mem ();
  520. extern rtx get_parm_real_loc ();
  521. extern rtx assign_stack_local ();
  522. extern rtx protect_from_queue ();
  523. extern void emit_queue ();
  524. extern rtx emit_move_insn ();
  525. extern rtx emit_insn ();
  526. extern rtx emit_jump_insn ();
  527. extern rtx emit_call_insn ();
  528. extern rtx emit_call_insn_before ();
  529. extern rtx emit_insn_before ();
  530. extern rtx emit_insn_after ();
  531. extern rtx emit_label ();
  532. extern rtx emit_barrier ();
  533. extern rtx emit_barrier_after ();
  534. extern rtx emit_note ();
  535. extern rtx emit_line_note ();
  536. extern rtx emit_line_note_force ();
  537. extern rtx prev_real_insn ();
  538. extern rtx next_real_insn ();
  539. extern rtx next_nondeleted_insn ();
  540. extern rtx plus_constant ();
  541. extern rtx find_equiv_reg ();
  542. extern rtx delete_insn ();
  543. extern rtx adj_offsettable_operand ();
  544.  
  545. /* Maximum number of parallel sets and clobbers in any insn in this fn.
  546.    Always at least 3, since the combiner could put that many togetherm
  547.    and we want this to remain correct for all the remaining passes.  */
  548.  
  549. extern int max_parallel;
  550.  
  551. extern int asm_noperands ();
  552. extern char *decode_asm_operands ();
  553.  
  554. #ifdef BITS_PER_WORD
  555. /* Conditional is to detect when config.h has been included.  */
  556. #ifdef MPW_C31
  557. /* Having this routine return an enum seems to cause problems. */
  558. extern int reg_preferred_class ();
  559. #else
  560. extern enum reg_class reg_preferred_class ();
  561. #endif /* MPW_C31 */
  562. #endif
  563.  
  564. extern rtx get_first_nonparm_insn ();
  565.  
  566. /* Standard pieces of rtx, to be substituted directly into things.  */
  567. extern rtx pc_rtx;
  568. extern rtx cc0_rtx;
  569. extern rtx const0_rtx;
  570. extern rtx const1_rtx;
  571. extern rtx fconst0_rtx;
  572. extern rtx dconst0_rtx;
  573. #ifdef APPLE_C
  574. extern rtx ldconst0_rtx;
  575. #endif /* APPLE_C */
  576.  
  577. /* Returns a constant 0 rtx in mode MODE.  */
  578.  
  579. #ifdef APPLE_C
  580. /* Extend this macro to return an `extended' zero. */
  581. #define CONST0_RTX(MODE) \
  582.  ((MODE == SFmode) ? fconst0_rtx            \
  583.   : ((MODE == DFmode) ? dconst0_rtx            \
  584.      : ((MODE == XFmode) ? ldconst0_rtx  \
  585.     : ((GET_MODE_CLASS (MODE) == MODE_INT) ? const0_rtx    \
  586.        : (abort (), NULL_RTX)))))
  587. #else
  588. #define CONST0_RTX(MODE) \
  589.  ((MODE == SFmode) ? fconst0_rtx            \
  590.   : ((MODE == DFmode) ? dconst0_rtx            \
  591.      : ((GET_MODE_CLASS (MODE) == MODE_INT) ? const0_rtx    \
  592.         : (abort (), NULL_RTX))))
  593. #endif /* APPLE_C */
  594.  
  595. /* All references to certain hard regs, except those created
  596.    by allocating pseudo regs into them (when that's possible),
  597.    go through these unique rtx objects.  */
  598. extern rtx stack_pointer_rtx;
  599. extern rtx frame_pointer_rtx;
  600. extern rtx arg_pointer_rtx;
  601. extern rtx struct_value_rtx;
  602. extern rtx struct_value_incoming_rtx;
  603. extern rtx static_chain_rtx;
  604. extern rtx static_chain_incoming_rtx;
  605.